#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json
import os
import sys

from app.modules1.common.jky_api_client import JiKeYunAPIClient

# 添加项目根目录到Python路径
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

# 设置标准输出编码为UTF-8
if sys.stdout.encoding != 'utf-8':
    sys.stdout.reconfigure(encoding='utf-8')


def getPurcheturnData():
    jky_api_client = JiKeYunAPIClient()
    # 构造请求参数
    bizdata = {
        "pageIndex": 0,
        "pageSize": 200,
    }
    response = jky_api_client.send_request('erp.purchreturn.get', bizdata)
    # 使用ensure_ascii=False确保中文正确显示
    print(json.dumps(response, indent=4, ensure_ascii=False))


if __name__ == '__main__':
    getPurcheturnData()
 